"""
任务发布：celery -A celery_task.main beat
任务监控：celery -A celery_task.main worker --loglevel=info
"""
import os
from celery import Celery

if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'meiduo.settings.dev_settings'

# 创建celery应用对象
app = Celery("meiduo")

# 导入celery的配置信息
app.config_from_object("celery_task.config")
